home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 101-125 / scopedisk101 / lvideo / lvideo.doc < prev    next >
Text File  |  1995-03-19  |  7KB  |  163 lines

  1.  
  2. Contained in this package is a Pioneer laser video disk driver for 
  3. The Director.  Also the system date & time can be read more easily using
  4. this module.  If you or anyone you know is interested in using The
  5. Director to control laser video disk players, you may wish to download
  6. this package.  Right now, only the Pioneer players are supported, though
  7. the interface is very general, it might be able to be adapted to other
  8. players with some experimentation.  This is kind of a "beta" version,
  9. we would appreciate any input you might have with regards to the use
  10. of this module so that we may improve its capabilities for an eventual
  11. commercial release.  It has been tested with the LD-V4200 player, and
  12. should work with the 2000 series as well, Pioneer uses pretty much the
  13. same type of protocol throughout their product line.
  14.  
  15. The laser video driver is implemented as a modified sound module, 
  16. it will communicate through the serial port to the laser disk
  17. player.  The standard sound commands are supported as well.
  18.  
  19. Note:  it is absolutely guaranteed that the methods employed here
  20. with regards to video disk control will vary by the time a commercial
  21. release is prepared (planned to work with a future major enhanced version
  22. of The Director).  The safest thing to do is to implement your disk
  23. controls as GOSUBs, so that if later it is necessary to modify
  24. the script you will only have to do it in one place for each command,
  25. not spread all throughout your script.
  26.  
  27. Setup:
  28.  
  29. Copy the "lvideo.mod" file into your "options" directory, or wherever
  30. MOD: is assigned for The Director on your system.
  31.  
  32. Use Preferences to select the baud rate and other serial parameters
  33. for connection to the video disk player.
  34.  
  35. It will be useful to obtain a copy of the players user manual which
  36. contains all of the commands available.  The commands are generally
  37. implemented in one of two ways, a 2 letter command followed by a
  38. CR character, or a numeric parameter followed by a two letter command
  39. and a CR character.
  40.  
  41. Commands are responded to in two ways, either with a letter followed
  42. by a numeric code, or with just a numeric code.
  43.  
  44.  
  45. To use, you first use the MODULE command to select the laser video
  46. module in your script:
  47.  
  48.     module "lvideo"
  49.  
  50. Note that "lvideo" should be lower case.
  51.  
  52. Then, if you plan to use the laser video portion of the module (it
  53. also contains all of the usual sound module capabilities) you need
  54. to initialize the communications:
  55.  
  56.     sound v,"init"
  57.  
  58. Note that the SOUND command is still used to communicate with the 
  59. driver module.  This is because the standard sound commands are 
  60. implemented in the module as well.  The laser video commands 
  61. are simply an extention of the standard sound commands.
  62.  
  63. To send the video player a command, use the "lv" command:
  64.  
  65.     sound v,"lv","PL"
  66.  
  67. This is the PLAY command.  The players manual will list the other
  68. 2 letter commands that can be substituted for other control functions.
  69. If the command requires a parameter, such as with the search command,
  70. it will look something like this:
  71.  
  72.     sound v,"lv","10552SE"
  73.  
  74.         or
  75.  
  76.     sound v,"lv",fr,"SE"
  77.  
  78. In the first instance, the frame location is built right into the search
  79. command, in the second, the frame location is contained in the variable
  80. "fr".  Either method is acceptable.
  81.  
  82. To get the response from a command, use the response command:
  83.  
  84.     sound val,"response"
  85.  
  86. It will return in the variable "val" the response code.  Virtually ALL
  87. commands return some sort of response, so it is important to get the
  88. response codes so that they don't interfere with the next command.
  89.  
  90. If there is no response code, "response" will wait for one.  You can
  91. test for a response without waiting with the "test" command which
  92. is otherwise equivalent to the "response" command.  "test" will return
  93. a -2 if there is no response yet (-1 is reserved for a module error 
  94. condition).  The normal response, "R" from the player, will appear as 
  95. a -1000000.  If the response code is prefixed with a letter, it will 
  96. return as a negative number, if there is no letter prefix, it will 
  97. return as a positive number (as in the ?F get frame number command).  
  98. The actual letter returned is converted into a "range" of numbers 
  99. depending on the letter prefix.  For example, all "R" codes will be 
  100. in the -1000000 to -1999999 range.  All "E" error codes will be in 
  101. the -3000000 to -3999999 range.  All "P" codes will be in the -2000000 
  102. to -2999999 range.  A normal "R" response which most commands will 
  103. return from the player, will return a -1000000 from the driver module.
  104.  
  105. A test script called "lvideo" is included that you can use to try out some 
  106. of the standard commands.  It will also allow you to click on a "command" 
  107. text box and type in other commands which you wish to try.  The "RESULT"
  108. box should be clicked on after you try commands in this manner, so that
  109. the old result code isn't left pending for the next command you try.
  110. The "RESULT" button does a "test" so if the result isn't yet available,
  111. or there is no result, you will get a -2.
  112.  
  113. Note that some commands won't return a result immediately, but after
  114. some operation in the video player is completed.  If you test for a result
  115. before the operation is complete, you will get a -2 (no result).  Once
  116. the operation is complete you will get the proper result.  This will allow
  117. you to test for the completion of an operation while doing other things,
  118. such as animating, etc.
  119.  
  120. The buttons in the example labeled "chapter", "frame" and "time" cause
  121. the display of the chapter, frame, and time above the buttons to be
  122. updated with the current values from the player.  Note that the "time"
  123. parameter only works with CLV disks on the LD-V4200 (and perhaps the
  124. others as well).  These values are not updated automatically in the
  125. example, but only when you press the buttons.
  126.  
  127. In addition to the laser video enhancements in this driver, also is
  128. contained the ability to read the system date & time.  To do so, there
  129. are 2 commands:
  130.  
  131.     sound day,"day"
  132.  
  133.     sound time,"time"
  134.  
  135. "day" is returned in the number of days since January 1,1978.  Time
  136. is returned in the number of "tics" in the current day (50ths of a
  137. second).  These values can be converted with a little bit of computation
  138. to MM/DD/YY HH:MM:SS.  As an example, the time would convert like this:
  139.  
  140.     hour = time/180000
  141.     minute = (time/3000)%60
  142.     second = (time/50)%60
  143.  
  144. etc.  Converting day to MM/DD/YY is a bit more complicated as you 
  145. have to take leap years into account.  I haven't had time to figure
  146. out the exact computation so I will leave it as an exersize for the
  147. reader for now.  This feature will be built in to the major Director 
  148. release currently in process, and the computations will be worked out 
  149. in full then.
  150.  
  151.  
  152. Again, note that this is an experimental "beta" video disk driver, 
  153. we need your comments and suggestions in order to make improvements.
  154.  
  155. Thanks,
  156.  
  157. Keith Doyle
  158. Right Answers
  159. Box 3699
  160. Torrance, CA 90510
  161. (213)-325-1311
  162.  
  163.